package by.admonko.universaltesting.services.impl;

import java.util.List;

import javax.inject.Inject;

import org.springframework.stereotype.Service;

import by.admonko.universaltesting.dataaccess.QuestionResultDao;
import by.admonko.universaltesting.datamodel.QuestionResult;
import by.admonko.universaltesting.services.QuestionResultService;

@Service
public class QuestresultServiseImpl implements QuestionResultService {
	@Inject
	QuestionResultDao questResDao;

	@Override
	public QuestionResult getQuestResult(Integer id) {

		return questResDao.getById(id);
	}

	@Override
	public List<QuestionResult> getQuestResultByTestResult(Integer id) {
		// TODO Create
		return null;
	}

	@Override
	public void setQuestResult(QuestionResult questionResult) {
		questResDao.insert(questionResult);

	}

	@Override
	public void updateQuestResult(QuestionResult questionResult) {
		questResDao.update(questionResult);

	}

	@Override
	public void removeQuestResultList(List<Integer> list) {
		questResDao.delete(list);

	}

}
